const data = [
  { id: 1, name: "Alice", age: 25, "a-change": 11 },
  { id: 2, name: "Bob", age: 30, "a-change": 22 },
  { id: 3, name: "Charlie", age: 35, "a-change": 33 }
];

// 动态筛选出指定的 key 值
function filterKeys(arr: any, keywords: any) {
  return arr.map((item: any) => {
    return Object.keys(item).reduce((acc: any, key) => {
      if (keywords.some((keyword: any) => key.includes(keyword))) {
        acc[key] = item[key];
      }
      return acc;
    }, {});
  });
}

const result = filterKeys(data, ["-change"]);
console.log(result);
